#include "Primitive.h"

#include <cstring>

using namespace RayTracer;

CPrimitive::CPrimitive(void) : m_Name(NULL), m_IsLight(false)
{
}

CPrimitive::~CPrimitive(void)
{
	if (m_Name != NULL)
		delete m_Name;
}

void CPrimitive::setName(const char *name)
{
	if (m_Name != NULL)
		delete m_Name;
	size_t len = strlen(name) + 1;
	m_Name = new char[len];
	strcpy_s(m_Name, len, name);
}
